<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link type="image/x-icon" rel="shortcut icon" href="/images/logo.png">
    <title>思通数科 Open-Spider</title>
    <script>
        if (!localStorage.getItem("token")) {
            window.location.replace("/page/login/index.html");
        }
    </script>

    <script src="/js/rem.js"></script>

    <link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css">
    <script src="/js/jquery.js"></script>
    <script src="/js/popper.min.js"></script>
    <script src="/bootstrap/js/bootstrap.min.js"></script>

    <link rel="stylesheet" href="/layui/css/layui.css">
    <script src="/layui/layui.js"></script>

    <link rel="stylesheet" href="/icon/iconfont.css">
    <link rel="stylesheet" href="/css/base.css">
</head>

<body>
    <div id="page">
        <!-- 接口调用成功提示 -->
        <div class="message message-success message-hide" style="top: 20px; z-index: 2014">
            <i class="iconfont icon-check-circle"></i>
            <p class="message_content"></p>
        </div>
        <!-- 接口调用失败提示 -->
        <div class="message message-error message-hide" style="top: 20px; z-index: 2014">
            <i class="iconfont icon-times-circle"></i>
            <p class="message_content"></p>
        </div>
        <div id="header">
            <div class="logo">
                <img src="/images/logo.png" alt="">
                <span class="system_name">思通数科 Open-Spider</span>
            </div>
            <div class="top-menu">
                <div class="menu pointer" onclick="toSource()">
                    <i class="iconfont icon-gitee-fill-round"></i>
                    <span>源码</span>
                </div>
                <div class="menu pointer" onclick="toUsercenter()">
                    <i class="iconfont icon-yonghu"></i>
                    <span>个人中心</span>
                </div>
                <div class="menu pointer" onclick="logoff()">
                    <i class="iconfont icon-tuichu"></i>
                    <span>退出</span>
                </div>
            </div>
        </div>
        <div id="core-container">
            <div id="left-side">
                <nav class="nav flex-column  menuList">
                    <a class="nav-link active" onclick="jump('/page/spiderMarket/index.html','采集市场')">
                        <i class="iconfont icon-04"></i>
                        <span>采集市场</span></a>
                    <a class="nav-link" onclick="jump('/page/spiderApply/index.html','采集应用')">
                        <i class="iconfont icon-yingyong"></i>
                        <span>采集应用</span></a>
                    <!-- <a class="nav-link" onclick="jumpTaskManage()">
                        <i class="iconfont icon-renwu"></i>
                        <span>采集任务管理</span></a> -->
                    <a class="nav-link" onclick="jump('/page/dataResult/index.html','采集数据')">
                        <i class="iconfont icon-caiji"></i>
                        <span>采集数据</span></a>
                    <a class="nav-link" onclick="jump('/page/systemLogs/index.html','系统日志')">
                        <i class="iconfont icon-rizhi"></i>
                        <span>系统日志</span></a>
                    <a class="nav-link" onclick="jump('/page/helpDoc/index.html','帮助文档')">
                        <i class="iconfont icon-shiyongwendang"></i>
                        <span>帮助文档</span></a>
                    <!-- <a class="nav-link" onclick="jump('/page/resourceManage/index.html','采集资源监管')">
                        <i class="iconfont icon-stack"></i>
                        <span>采集资源监管</span></a> -->
                    <!-- <a class="nav-link" onclick="jump('/page/spiderTemplate/index.html','数据采集模板')">
                        <i class="iconfont icon-moban"></i>
                        <span>数据采集模板</span></a> -->

                </nav>
            </div>
            <div id="right-side">
                <div id="main">

                </div>
                <div class="footer">© 2014-2024 思通数科（南京）信息技术有限公司 苏ICP备17066984号-1</div>
            </div>

        </div>
    </div>
    <script src="/js/intercept.js"></script>
    <script src="/js/router.js"></script>
    <script>
        var isindex = true;

        var links = document.querySelectorAll(".menuList a");
        var matchingMenuItem = null;
        matchingMenuItem = links[0];

        if (matchingMenuItem) {
            matchingMenuItem.classList.add("active");
        }

        if (sessionStorage.path && sessionStorage.path.indexOf("/page") == -1) {
            sessionStorage.removeItem("path");
            sessionStorage.removeItem("name");
            sessionStorage.removeItem("parentname");
            sessionStorage.removeItem("obj");
        }

        if (!sessionStorage.path) {
            jump("/page/spiderMarket/index.html", "采集市场");
        } else {
            var path = sessionStorage.getItem("path");
            var name = sessionStorage.getItem("name");
            var parentname = sessionStorage.getItem("parentname");
            var obj = sessionStorage.getItem("obj")
                ? JSON.parse(sessionStorage.getItem("obj"))
                : "";
            jump(path, name, parentname, obj);
        }

        function toUsercenter() {
            window.location.href = "/page/usercenter/index.html"
        }

        function toSource() {
            window.open("https://gitee.com/stonedtx/open-spider")
        }


        //登出
        function logoff() {
            $.ajax({
                method: "POST",
                url: baseUrl + "/exit",
                contentType: "application/json",
                dataType: "json",
                data: {},
                success: function (res) {
                    if (res.code == 200) {
                        localStorage.removeItem("token");
                        window.location.replace("/page/login/index.html");
                    }

                }
            })

        }

        // function jumpTaskManage() {
        //     if (window.location.pathname == "/page/spiderApply/websiteDetail.html") {
        //         jump('/page/collectTask/index.html', '采集任务管理', "", { id: websiteId, name: websiteName })
        //         websiteId = "";
        //         websiteName = "";
        //     } else {
        //         jump('/page/collectTask/index.html', '采集任务管理')
        //     }
        // }
    </script>

</body>

</html>